<%inherit file="/dashboard/site.mako" />
<%def name="title()">Dashboard - Modification de page</%def>
<div style="padding: 20px;">
<div>
	${c.message | n}
	%if request.params.get('modified_page') == 'yes':
		<span class='success_message'>La page a ete correctement modifier</span>
	%elif request.params.get('modified_page') == 'no':
		<span class='error_message'>La page n'a pas etre modifiee - veulliez signaler l'incident au webmaster s'il vous plais</span>
	%endif
	</div>
<p>Modification de la page > ${c.page.name} <</p>

<form  method="post" action="/dashboard/modif_page_submit" style="width: 1000px;  ">
	<div>	
		<textarea name="content" id="page_content">${c.page.content}</textarea>
	</div>
		<input type="hidden" name="id" value="${c.page.id}" />
		<input type="hidden" name="name" value="${c.page.name}" />
		
		<p style="background: white;"><input type="submit" value="Envoyer" /> - <a href="/dashboard">Annuler</a></p>
	</form>
</div>

<script type="text/javascript">
$(document).ready(function() {
	CKEDITOR.replace( 'page_content' );
	CKEDITOR.config.height = '600px';
	CKEDITOR.config.language = 'fr';
	CKEDITOR.config.contentsCss = '/ckeditor/mysitestyles.css';
	CKEDITOR.config.uiColor = 'grey';
	window.onbeforeunload = function (e) {
		  e = e || window.event;

		  // For IE and Firefox prior to version 4
		  if (e) {
		    e.returnValue = 'Any string';
		  }

		  // For Safari
		  return 'Any string';
		};
});
</script>